<html>
				<head>
				<meta http-equiv="content-type" content="text/html; charset=UTF-8">
				</head>
				<body><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=AIO_ERROR&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">AIO_ERROR(2)</a> FreeBSD System Calls Manual <a href="http://www.freebsd.org/cgi/man.cgi?query=AIO_ERROR&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">AIO_ERROR(2)</a></pre>
<pre>
<b>名称</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aio_error -- 获取异步I/O操作的错误状态（实时）</pre>
<pre>
<b>库</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Standard C Library (libc, -lc)</pre>
<pre>
<b>概要</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#include &lt;<font color="dark">aio.h</font>&gt;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">int</font> <font color="blue">aio_error</font>(<font color="red">const struct aiocb *</font> <font color="green">iocb</font>);</pre>
<pre>
<b>详述</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=blue>aio_error()</font>系统调用返回<font color="green">iocb</font>指向的异步I/O操作请求的错误状态。</pre>
<pre>
<b>返回值</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;若异步I/O操作成功完成，<font color=blue>aio_error()</font>返回0；若尚未完成，返回EINPROGRESS。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;若异步I/O操作完全失败，返回的错误描述见<a href="http://www.freebsd.org/cgi/man.cgi?query=read&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">read(2)</a>，<a href="http://www.freebsd.org/cgi/man.cgi?query=write&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">write(2)</a>和<a href="http://www.freebsd.org/cgi/man.cgi?query=fsync&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">fsync(2)</a>。
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;失败时，<font color=blue>aio_error()</font>返回-1，并设置errno为对应的数值。</pre>
<pre>
<b>错误</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=blue>aio_error()</font>失败时将设置errno为下列错误常量：
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[EINVAL]	<font color="green">iocb</font>参数指向的不是一个未完成的异步I/O操作。</pre>
<pre>
<b>参见</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=aio_cancel&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">aio_cancel(2)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=aio_read&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">aio_read(2)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=aio_return&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">aio_return(2)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=aio_suspend&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">aio_suspend(2)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=aio_write&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">aio_write(2)</a>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.freebsd.org/cgi/man.cgi?query=fsync&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">fsync(2)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=read&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">read(2)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=write&sektion=2&apropos=0&manpath=FreeBSD+6.1-RELEASE">write(2)</a>, <a href="http://www.freebsd.org/cgi/man.cgi?query=aio&sektion=4&apropos=0&manpath=FreeBSD+6.1-RELEASE">aio(4)</a></pre>
<pre>
<b>标准</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=blue>aio_error()</font>系统调用应当遵循IEEE Std 1003.1 (``POSIX.1'')标准。</pre>
<pre>
<b>历史</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=blue>aio_error()</font>系统调用首次出现于FreeBSD 3.0。</pre>
<pre>
<b>作者</b>:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;该页手册由Wes Peters &lt;wes@softweyr.com&gt;编写。</pre>
</pre>
</body></html>